package com.hnkywl.sts.dao.base;

import com.hnkywl.sts.entity.base.Ewm;
import net.ruixin.orm.hibernate.SimpleHibernateTemplate;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: jerry
 * Date: 13-6-17
 * Time: 下午2:14
 * To change this template use File | Settings | File Templates.
 */
@Repository
public class EwmDao extends SimpleHibernateTemplate<Ewm,Long> {
    public Ewm getEwm(Long bdid,String type) {
        String hql = "from Ewm where bdid = ? and type = ? and deleted = 0";
        return (Ewm)find(hql, bdid, type).get(0);
    }
}
